//
//  DicRespones.m
//  MBObjectServer
//
//  Created by Juvid on 14-3-31.
//  Copyright (c) 2014年 MBpayer. All rights reserved.
//

#import "DicRespones.h"

@implementation DicRespones
-(id)init{
    self=[super init];
    if (!self) {
        return nil;
    }
    baseserver=[[MBBaseServer alloc]init];
    baseserver.delegate=self;
    return self;
}
-(void )RetrieveBillSale:(NSString *)saleID
             ReceiveData:(ReceiveFinished)Data{
    ReceiveFinish=[Data copy];
    NSMutableDictionary* postDic=[[NSMutableDictionary alloc]init];
    [postDic setObject:saleID forKey:@"SaleID"];
    NSMutableArray * enumArray = [[NSMutableArray alloc]init] ;
    for (int i = 0 ; i < 4 ; i++) {
        NSNumber * enums = [NSNumber numberWithInt:i];
        [enumArray addObject:enums] ;
    }
    [postDic setObject:enumArray forKey:@"BillSaleWrapEnums"];
    
    [baseserver setRequestStyle:nil
               andSetPathString:@"billsale_handler.ashx"
               andSetHeadString:nil
                  andActionName:@"RetrieveBillSale"
           andSetMainDictionary:postDic];
    
}
-(void)receiveData:(NSDictionary *)dic WithPath:(NSString *)path
{
    BOOL  Result = [[dic objectForKey:@"Result"] boolValue];
    if (!Result) {
         ReceiveFinish(dic);
    }
}
-(void)FailureData:(NSString *)path WithError:(NSError *)error{
    
}
@end
